package vwg.na.vwm.rh.motorsdk.modelo.procesos.entidadesgrales;

import java.io.Serializable;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import org.hibernate.annotations.LazyCollection;
import org.hibernate.annotations.LazyCollectionOption;

@Entity
@Table(name = "ide_autoPartes")
public class IdeAutoPartes implements Serializable {

    private static final long serialVersionUID = 1L;

    private Long idAutoPartes;
    private IdeParte ideParte;
    private IdeAuto ideAuto;

    public IdeAutoPartes() {
    }

    public void setIdautopartes(Long idautopartes) {
	this.idAutoPartes = idautopartes;
    }

    @Id
    @Column
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    public Long getIdautopartes() {
	return this.idAutoPartes;
    }

    public void setIdeParte(IdeParte ideParte) {
	this.ideParte = ideParte;
    }

    @LazyCollection(LazyCollectionOption.TRUE)
    @ManyToOne(fetch = FetchType.LAZY)
    @JoinColumn(name = "idParte")
    public IdeParte getIdeParte() {
	return this.ideParte;
    }

    public void setIdeAuto(IdeAuto ideAuto) {
	this.ideAuto = ideAuto;
    }

    @LazyCollection(LazyCollectionOption.TRUE)
    @ManyToOne(fetch = FetchType.LAZY)
    @JoinColumn(name = "idAuto")
    public IdeAuto getIdeAuto() {
	return this.ideAuto;
    }

}
